package spring.cloud.tasks.client.item_task_processor.task_item;

import com.alibaba.fastjson.JSON;

import java.util.HashMap;
import java.util.Map;

public class ServerTaskItemsSnapshotInfo {
    public Map<String, String> taskItemToProcessorIdMap = new HashMap<String, String>();

    public static ServerTaskItemsSnapshotInfo parse(byte[] bytes) {
        return JSON.parseObject(new String(bytes), ServerTaskItemsSnapshotInfo.class);
    }

    public byte[] getBytes() {
        return JSON.toJSONString(this).getBytes();
    }
}
